cmake_minimum_required ( VERSION 2.6 )
project ( JSON_Test_Server )

set ( SRC_DIR ${PROJECT_SOURCE_DIR}/src )
set ( LIB_DIR ${PROJECT_SOURCE_DIR}/libs )
set ( CMAKE_BUILD_TYPE Debug)

include_directories ( ${PROJECT_SOURCE_DIR}/ex_hpp )
include_directories ( ${PROJECT_SOURCE_DIR}/include )
# Здесь должен быть путь на заголовочные файлы MySQL C API
include_directories ( /usr/include/mysql )

list(APPEND SRC ${SRC_DIR}/main.cpp )
list(APPEND SRC ${SRC_DIR}/application.cpp )
list(APPEND SRC ${SRC_DIR}/app-shared.cpp )
list(APPEND SRC ${SRC_DIR}/client-handler.cpp )
list(APPEND SRC ${SRC_DIR}/logger.cpp )
list(APPEND SRC ${SRC_DIR}/socket.cpp )
list(APPEND SRC ${SRC_DIR}/json.cpp )
list(APPEND SRC ${SRC_DIR}/app-mysql.cpp )

add_executable ( json-test-server ${SRC} )

# Подключение дополнителных библиотек -L и -l
#link_directories ( ${PROJECT_SOURCE_DIR}/libs )
# При использовании сторонней библиотеки jsoncpp
#target_link_libraries( json-test-server json_linux-gcc-4.6.1_libmt )

# При подключении сторонней библиотеки MySQL C API
target_link_libraries( json-test-server mysqlclient )


